In recent years, imaging apparatus have improved in performance and decreased in size and cost, and as a result, imaging apparatus (or images captured by imaging apparatus) have been widely used in various fields. As an example thereof, it has become possible to detect the presence or absence, position, distance and the like of a three-dimensional object such as an obstruction from an image obtained by an imaging apparatus mounted on a vehicle that images a space in front of the vehicle and issues a warning as necessary. However, since the imaging apparatus records a three-dimensional space as an image target on a two-dimensional plane, the obtained image lacks three-dimensional information of a three-dimensional object existing in the imaging target space. Therefore, space recognition such as detection of a three-dimensional object from an image is achieved in a manner such that two imaging apparatuses image the same space to produce a pair of images with a difference corresponding to a parallax, the parallax is extracted from the pair of images, and the extracted parallax is made to correspond to spatial information.
In order to extract the parallax from the pair of images with a difference corresponding to the parallax, a block matching method is generally used. According to the block matching method, two images are searched for corresponding points, and the difference in the positions of the corresponding points in the pair of images with a difference corresponding to the parallax corresponds to the parallax.
Specifically, one of the pair of images is defined as a reference image, the other of the pair of the images is defined as a comparison image, and an evaluation area of, for example, about 8×4 pixels is set around a target pixel of the reference image. Further, a similar evaluation area is also set in the comparison image, the difference between a pair of evaluation areas is calculated for each pixel, the degree of matching of the pair of evaluation areas is repeatedly evaluated using an evaluation function (Σ|Li−Ri|) for integrating an absolute value of the difference or an evaluation function (Σ(Li−Ri)2) for integrating a square value of the difference while moving (raster scan) the position of the evaluation area in the comparison image, and the position of the evaluation area with the highest (the value of the evaluation function is the minimum (the smallest)) degree of matching in the comparison image is obtained. This position is a position of the corresponding point on the comparison image with respect to the target pixel of the reference image, and the difference between the position of the target pixel on the reference image and the position of the corresponding point on the comparison image corresponds to the parallax. Further, as illustrated in FIG. 16, a distance L to an object corresponding to a target pixel is calculated by Equation 1 below from parallax D, focal lengths f of two imaging apparatuses 104L and 104R, and a distance (baseline length) b between the two imaging apparatuses 104L and 104R.Equation 1L=b×f/D  (1)
The above processing is performed for all pixels of the reference image, so that distances to individual objects captured as images can be detected. Note that, in FIG. 16, the reference numeral 106 is an imaging surface and the reference numeral 108 is a corresponding point (a corresponding pixel) on a comparison image.
As a technology using the block matching method, Japanese Patent Application Laid-open (JP-A) No. 2001-92968 discloses a technology in which image data in a reference pixel area in one captured image and image data on a horizontal line corresponding to a vertical position of a reference pixel area in another captured image are stored in a line memory, the image data in the reference pixel area and image data within a set search range are read from the line memory, the correlation destination of the reference pixel area is specified by stereo matching (block matching), and the position of the search range related to the reference pixel area is corrected based on the degree of deviation of a corresponding infinite point using a horizontal position of the reference pixel area as a reference.
JP-A No. 2007-235642 discloses a technology of creating a top view obtained by projectionally transforming a first image (oblique overhead view) including a road surface captured by a camera mounted on a vehicle and a top view obtained by projectionally transforming a second image captured by the same camera at a timing different from that of the first image, matching the two top views against each other by pattern matching based on a characteristic shape (for example, a white line, a boundary line between the road surface and a three-dimensional object, texture of the road surface, a tire nut or the like) on the road surface, and identifying a region having a difference in an overlapping portion of the two top views as an obstruction.
JP-A No. 2000-293693 discloses a technology in which a right image and a left image captured by two TV cameras capturing a road plane are stored, plural lines appearing on the stored right and left images are extracted, corresponding points between the right and left images are calculated based on the extracted plural lines, a parameter of a relational formula established between projecting positions of arbitrary points of the road plane is calculated based on the calculated corresponding points, and a region having a height different from that of the road plane is detected as an obstacle region based on a relational formula determined according to the calculated parameter.